import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 黎鹤舞
 * Date: 2024-04-15
 * Time: 20:13
 */
public class Main {


    //Q1:统计[L,R]范围内的所有整数中，出现数字2的个数
//    public static void main(String[] args) {
//        Scanner scanner = new Scanner(System.in);
//        int L = scanner.nextInt();
//        int R = scanner.nextInt();  //记录数据范围
//        int count = 0;
//        for(int i = L; i <= R; i++) {
//            int ret = twoCount(i);
//            count += ret;
//        }
//        System.out.println(count);
//    }
//
//    //返回一个数 2出现的次数
//    public static int twoCount(int num){
//        int count = 0;
//        while(num >= 10) {
//            int remainder = num % 10;
//            if(remainder == 2) {count++;}
//            num = num/10;
//        }
//        if(num == 2) {count++;}
//        return count;
//    }

    //Q2:消除字符串中相邻的两个字符
    //eg: abbbbbc -> abc
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String str = "";
        String input = scanner.nextLine();
        //这里的str分为奇数和偶数
        if(str.length() %2 == 0) {
            for (int i = 0; i < input.length()-1; i++) {    //遍历字符串;
                char ch = input.charAt(i);
                char next = input.charAt(i+1);
                int result = Character.compare(ch,next);
                if(result == 0) {
                    i++;
                }else {
                    str += Character.toString(ch);
                }
            }
            char ch = input.charAt(input.length()-1);
            str += Character.toString(ch);
            System.out.println(str);
        }else {
            for (int i = 0; i < input.length(); i++) {    //遍历字符串;
                char ch = input.charAt(i);
                char next = input.charAt(i+1);
                int result = Character.compare(ch,next);
                if(result == 0) {
                    i++;
                }else {
                    str += Character.toString(ch);
                }
            }

        }
    }
}
